home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * Image.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
- if (!IS.isModuleInitialized("IS.NOF.Image"))
- {
- /****h* NOF_JavaScript_Library/NOF.Image
- *
- * NAME
- * NOF.Image
- *
- * DESCRIPTION
- *
- * External dependencies: NOF.ImageAttributes
- ****/
-
- /**
- * Constructor
- * @param title
- * @param description
- * @param imagePath
- * @param rotation
- * @param displayAttrs
- * @param indexAttrs
- **/
- function NOF_Image( title, description, imagePath, rotation, displayAttrs, indexAttrs ) {
-
- this.__proto__ = NOF_Image.prototype;
-
- this.title = arguments.length > 0 ? arguments[0] : '';
- this.description = arguments.length > 1 ? arguments[1] : '';
- this.imagePath = arguments.length > 2 ? arguments[2] : '';
- this.rotation = arguments.length > 3 ? arguments[3] : 0;
- this.displayAttrs = arguments.length > 4 ? arguments[4] : null;
- this.indexAttrs = arguments.length > 5 ? arguments[5] : null;
-
- if (this.displayAttrs == null)
- this.displayAttrs = new NOF.ImageAttributes();
- if (this.indexAttrs == null)
- this.indexAttrs = new NOF.ImageAttributes();
-
- }
-
- {
-
- var method = NOF_Image.prototype;
- /*
- equal;
- clone;
- toString;
- */
-
- method.equal = function (o) {
- return ( this.title == o.title
- && this.description == o.description
- && this.imagePath == o.imagePath
- && this.rotation == o.rotation
- && this.displayAttrs.equal(o.displayAttrs)
- && this.indexAttrs.equal(o.indexAttrs));
- }
-
- method.clone = function () {
- return new NOF.Image(this.title, this.description,
- this.imagePath, this.rotation, this.displayAttrs.clone(), this.indexAttrs.clone());
- }
-
- method.toString = function () {
- return ' title = ' + this.title +
- ', description = ' + this.description +
- ', path = ' + this.imagePath +
- ', rotation = ' + this.rotation +
- ', DisplayAttrs :: ' + this.displayAttrs.toString() +
- ', IndexAttrs :: ' + this.indexAttrs.toString();
- }
- }
-
- NOF.__proto__.Image = NOF_Image;
-
- }